package top.tagao.m02_creationalPatterns.c_04_Factory;

/**
 * @author fu-xiao-liu
 * @Date 2022/7/25 20:52
 */
public class Main {
    public static void main(String[] args) {
        //1.创建工厂
        AbstractFactory window = new WindowsConcreteFactory();

        //2.从工厂得到产品
        ButtonProduct buttonProduct = window.buttonProduct();
        buttonProduct.onClick();
        buttonProduct.render();

        System.out.println("-------------------------------------------------");

        //1.创建工厂
        AbstractFactory HTML = new HtmlConcreteFactory();

        //2.从工厂得到产品
        buttonProduct = HTML.buttonProduct();
        buttonProduct.onClick();
        buttonProduct.render();

    }
}
